package com.xx.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xx.common.constant.BridgeHealthInfo;
import com.xx.system.mapper.SysBridgeHealthInfoMapper;
import com.xx.system.service.ISysBridgeHealthInfoService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * TODO
 * 桥梁健康数据表服务实现类
 * @Author kzw
 * @Date 2025/4/2 15:09
 */
@Service
public class SysBridgeHealthInfoServiceImpl extends ServiceImpl<SysBridgeHealthInfoMapper, BridgeHealthInfo> implements ISysBridgeHealthInfoService {
    /*@Override
    public boolean syncBridgeHealthInfo(BridgeHealthInfo bridgeHealthInfo, String token) {

        return saveOrUpdate(bridgeHealthInfo);
        // 验证token是否有效
        if (JWTUtil.verifyToken(token)) {
            // 如果token验证通过，则执行插入或更新操作
            return saveOrUpdate(bridgeHealthInfo);
        } else {
            // 如果token无效，返回false
            return false;
        }
    }*/

    @Override
    public boolean syncBridgeHealthInfo(List<BridgeHealthInfo> bridgeHealthInfoList) {
        return saveOrUpdateBatch(bridgeHealthInfoList);
    }
}
